<fieldset>
    <legend><?php _resource('Add translate field');?></legend>
    <!--	show error and message -->

<center><div id="message">&nbsp;</div><center>
<?php if($this->Session->read('message')){
	echo '<script>showMessage("mainContent","'.$this->Session->read('message').'");</script>';
	$this->Session->delete('message');	
	}?>
<?php if($this->Session->read('error')){
	echo '<script>showMessage("mainContent","'.$this->Session->read('error').'",1);</script>';
	$this->Session->delete('error');
}?>
    <form id="adminForm" name="adminForm" method="post" action="<?php echo $this->params['controller']?>/addTranslateField"  onsubmit="onFormSubmit();return false;">
    <?php
		
	?>
	<table border="0" class="form" style="width:100%">
       	<tr>          
       		<td class="label" align="right" width="40%"><?php _resource('Model') ?></td>
       		<td align="left">
       			<?php echo $this->Form->input('Tool.model',array('type'=>'select','options'=>$data,'empty'=>'',"onchange"=>'ajax("listfield","'.$this->params['controller'].'/nocheck_getTranslateField/" + this.value)',"class"=>"inputbox","label"=>"","error"=>""));?>
       		</td>           
        </tr>
        <tr>          
       		<td class="label" align="right" width="40%"><?php _resource('Field') ?></td>
       		<td align="left" id="listfield">
       		<?php if(isset($this->data['Tool']['model'])){?>
       		<script type="text/javascript" >
       		ajax("listfield","<?php echo $this->params['controller'].'/nocheck_getTranslateField/'.$this->data['Tool']['model']?>")
       		</script>
       		<?php }?>
       		</td>           
        </tr>        
	</table>
    <div style="width:130px">
          <div class="button"><a onclick="onFormSubmit()" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
          <div class="button"><a onclick="resetForm('adminForm')" href="javascript:;" title="<?php echo _resource('reset') ?>"  > <span class="icon-32-back"> </span></a> </div>
    </div>
      </form>
</fieldset>
<script>
function onFormSubmit(){
	submitForm('adminForm','mainContent');
}
</script>




